<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: red;
            display: none;
        }
        .box {
            width: 150px;
            height: 300px;
            background-color: pink;
            display: none;
        }
    </style>
    <script src="./js/jquery-3.7.1.js"></script>
</head>
<body>
    <button>下拉滑动</button>
    <button>上拉滑动</button>
    <button>切换滑动</button>
    <div class="box"></div>
    <script>
        $(function(){
            $('button').eq(0).click(function(){
                $('.box').slideDown(1000);
            })
            $('button').eq(1).click(function(){
                $('.box').slideUp(1000);
            })
            $('button').eq(2).click(function(){
                $('.box').slideToggle(1000);
            })
        })
    </script>
</body>
</html>